<template>
  <ant-modal
    modalWidth="550"
    modalHeight="750"
    :visible="open"
    :modal-title="formTitle"
    :adjust-size="true"
    @cancel="cancel"
  >
    <a-form-model
      ref="form"
      :model="form"
      :rules="rules"
      slot="content"
      layout="vertical"
    >
      <a-row :gutter="32" style="width: 80%; margin-left: 10%">
        <a-col :span="24">
          <a-form-model-item label="回执企业" prop="deptName">
            <a-input
              v-model="form.deptName"
              placeholder="请输入创建者"
              disabled=""
            />
          </a-form-model-item>
        </a-col>
        <a-col :span="24">
          <a-form-model-item label="回执人员" prop="userName">
            <a-input
              v-model="form.userName"
              placeholder="请输入创建部门"
              disabled=""
            />
          </a-form-model-item>
        </a-col>
        <a-col :span="24">
          <a-form-model-item label="回执内容" prop="huizhiContent">
            <a-textarea
              v-model="form.huizhiContent"
              placeholder="请输入内容详情"
              :auto-size="{ minRows: 10, maxRows: 25 }"
              :disabled="isEdit"
            ></a-textarea>
          </a-form-model-item>
        </a-col>
        <a-col :span="24">
          <a-form-model-item label="回执附件" prop="fileList">
            <file-upload
              :fileList="fileList"
              @afterUpload="uploadCompleteFile"
              @removeFile="handlerRemoveFile"
              v-if="!isEdit"
            ></file-upload>
            <span v-else>
              <span v-for="(item, index) in fileList" :key="index">
                <a :href="item.fileUrl" target="_blank">{{ item.fileName }}</a>
                <br />
              </span>
            </span>
          </a-form-model-item>
        </a-col>
      </a-row>
    </a-form-model>
    <template slot="footer">
      <a-button @click="cancel"> 取消 </a-button>
      <a-button type="primary" @click="submitForm" v-if="!isEdit">
        确认回执
      </a-button>
    </template>
  </ant-modal>
</template>
<script>
import BizLinshiDeptManageAddForm from "./BizLinshiDeptManageForm";
export default {
  ...BizLinshiDeptManageAddForm,
};
</script>
